<template>
  <el-config-provider
    :locale="
      appStore.language === 'zh-cn' ? zhcn : appStore.language ? en : '' || zhcn
    "
  >
    <router-view />
  </el-config-provider>
</template>

<script setup>
import useSettingsStore from "@/store/modules/settings";
import { handleThemeStyle } from "@/utils/theme";
import { nextTick, onMounted } from "vue";
import useAppStore from "@store/modules/app";
import zhcn from "element-plus/es/locale/lang/zh-cn";
import en from "element-plus/es/locale/lang/en";

const appStore = useAppStore();

onMounted(() => {
  nextTick(() => {
    // 初始化主题样式
    handleThemeStyle(useSettingsStore().theme);
  });
});
</script>

<style lang="scss" >
@import '@/assets/styles/variables.module.scss';

// 弹出框 公共样式
header {
  border-radius: 5px;
  margin-bottom: 10px;
  .el-dialog__title {
    margin-left: 20px;
    display: flex;
    align-items: center;
    line-height: 22px;
    font-weight: 900;
  }
  .el-dialog__headerbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    height: 30px !important;
    width: 30px !important;
    border-radius: 100%;
    background: #fff;
    border: 2px solid #b9b9b9;
    box-shadow: 0px 0px 0px 4px #fff !important;
    top: 8px !important;
    right: 8px !important;
    .el-dialog__close {
      color: #b9b9b9 !important;
    }
  }
}

// 分割线样式
.el-divider{
    border: 1px solid $--color-primary;
    .is-left{
        font-weight: 900;
        font-size: 18px;
        padding: 0 10px;
        color: $--color-primary;
    }
}
</style>